﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using PJ.Business.Partner;
using PJ.Data.SalePurchase;

namespace PJ.Business.SalePurchase
{
    /// <summary>
    /// ShoppingCartItemService class
    /// </summary>
    /// <typeparam name="O">Object to serve type</typeparam>
    /// <typeparam name="OD">Inner data object type</typeparam>
    /// <typeparam name="ODP">Inner data object provider type</typeparam>
    public abstract class ShoppingCartService<OI, OD, ODP> : EntityService<OI, OD, ODP>, IShoppingCartService
        where OI : class, IShoppingCart
        where OD : class, IShoppingCartData
        where ODP : class, IShoppingCartProvider<OD>
    {
        #region Constructor
        /// <summary>
        /// Initialize
        /// </summary>
        /// <param name="dataService"></param>
        /// <param name="partnerService"></param>
        public ShoppingCartService(ODP dataService)
            : base(dataService)
        {
        }

        #endregion

        #region Interface implementation

        public abstract IPartnerService PartnerService { get; }
        
        #endregion

        #region Interface override

        public IEntityService OwnerService
        {
            get { return PartnerService; }
        }

        #endregion


    }
}
